package service.impl;

import dao.MovieDao;
import dao.impl.MovieDaoImpl;
import entity.Movie;
import service.MovieService;

import java.util.List;

public class MovieServiceImpl implements MovieService {
    private MovieDao movieDao=new MovieDaoImpl();
    @Override
    public List<Movie> getMovieByPage(int pageNo, int pageSize) {
        return movieDao.getMovieByPage(pageNo,pageSize);
    }

    @Override
    public Integer count() {
        return movieDao.count();
    }

    @Override
    public Integer countByName(String name) {
        return movieDao.countByName(name);
    }

    @Override
    public Integer insert(Movie movie) {
        return movieDao.insert(movie);
    }

    @Override
    public Movie getMovieById(Integer id) {
        return movieDao.getMovieById(id);
    }

    @Override
    public Integer upate(Movie movie) {
        return movieDao.upate(movie);
    }

    @Override
    public Integer delete(Integer id) {
        return movieDao.delete(id);
    }
}
